package com.yima.baseproj.module.app.qa;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yima.baseproj.module.app.qa.model.AppQAAddParamModel;
import com.yima.baseproj.module.config.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("app_qa")
public class AppQAEntity extends BaseEntity {

    @ApiModelProperty(value = "标题")
    @TableField(value = "title")
    private String title;

    @ApiModelProperty(value = "内容")
    @TableField(value = "content")
    private String content;

    @ApiModelProperty(value = "排序")
    @TableField(value = "sort")
    private Integer sort;

    @ApiModelProperty(value = "排序")
    @TableField(value = "tags")
    private String tags;

    public void setData(AppQAAddParamModel paramModel) {
        this.title = paramModel.getTitle();
        this.content = paramModel.getContent();
        this.sort = paramModel.getSort();
        this.tags = paramModel.getTags();
    }
}
